package com.map;

import java.util.HashMap;
import java.util.Map;

public class Temp {
    public static String names = "";
//    public static List<FloatElement> list = new ArrayList<FloatElement>();
    public static String temp = "";
    public static String temps = "";

    public static Map<String,String> map = new HashMap<String, String>();
    public static String mapStr = "";

    public static String mapToString(Map<String,String> map){
        String str = "";
        for (Map.Entry<String, String> m : map.entrySet()) {
            str += m.getKey()+":"+m.getValue()+";";
        }
        return str.substring(0,str.length()-1);
    }

    public static Map<String,String> stringToMap(String str){
        Map<String,String> map = new HashMap<String, String>();
        String[] strs = str.split(";");
        for(String ss:strs){
            System.out.println("ss:"+ss);
            String aa[] = ss.split(":");
            map.put(aa[0],aa[1]);
        }
        return map;
    }

}
